﻿namespace Grow.Rest
{
    public interface IRestClient
    {
        IRestClient SetHttpType(HttpTypeEnum httpType);
        IRestClient AddHeader(string key, string value);
        IRestClient AddParameter(string key, string value);
        IRestClient AddBody(object? body);


        Task<IRestClientResponse> SendAsync(string url, CancellationToken cancellationToken = default);

        Task<IRestClientResponse<TData>> SendAsync<TData>(string url, CancellationToken cancellationToken = default);
    }
}